import request, { extend } from 'umi-request';
// import { extend } from 'umi-request';


const res = extend({
  prefix: "/api",
  timeout: 5000,
});

export async function getAuthCode(
    data?:string,
    ) {
        console.log(data);
        
    return res<API.Result>(`/getAuthCode/${data}`,
      {
        method: 'post',
        headers: {
          "Content-Type": "application/json"
        },
        data:{phone:data},
      })
  }

  export async function login(
    body?:any,
    ) {
    return res<API.Result>(`/loginUser`,
      {
        method: 'post',
        headers: {
          "Content-Type": "application/json"
        },
        data:body,
      })
  }